﻿//TableIdToPlazaTableConverter.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Plaza.Xaml
{
	using System;
	using System.Globalization;
	using System.Windows.Data;

	using StockSharp.Plaza.Metadata;

	class TableIdToPlazaTableConverter : IValueConverter
	{
		private static readonly PlazaTableRegistry _registry = new PlazaTableRegistry();

		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return _registry[(string)value];
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}